<div class="home_box">
  <div class="header">
    <div class="logo">
      <img src="@/assets/gp.png" alt="">
    </div>
    <div class="title">
        啥都有OA
    </div>
    <el-button @click="logoutHandler" class="logout" type="info">退出</el-button>
  </div>
  <div class="home">
    <div class="slide">
      <!-- default-active,当前激活菜单的 index -->
      <el-menu
      default-active="2"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
      :unique-opened="true"
      class="el-menu-vertical-demo"
      >
      <el-submenu v-for="item in menuList" :key="item.id" :index="item.id + ''">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span>{{item.authName}}</span>
        </template>
        <el-menu-item-group>
          <el-menu-item v-for="t in item.children" :key="t.id" :index="t.id + ''">
            <i class="el-icon-location"></i>
            <router-link :to="'/' + t.path" tag="span">{{t.authName}}</router-link>
          </el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <!-- <el-submenu index="2">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span>权限管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="2-1">
            <i class="el-icon-location"></i>
            <router-link to="/rights" tag="span">权限列表</router-link>
          </el-menu-item>
        </el-menu-item-group>
        <el-menu-item-group>
          <el-menu-item index="2-2">
            <i class="el-icon-location"></i>
            <router-link to="/rules" tag="span">角色列表</router-link>
            </el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="3">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span>商品管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="3-1">
            <i class="el-icon-location"></i>
            <router-link to="/goods" tag="span">商品列表</router-link>
          </el-menu-item>
        </el-menu-item-group>
        <el-menu-item-group>
          <el-menu-item index="3-2">
            <i class="el-icon-location"></i>
            <router-link to="/params" tag="span">分类参数</router-link>
            </el-menu-item>
        </el-menu-item-group>
        <el-menu-item-group>
          <el-menu-item index="3-3">
            <i class="el-icon-location"></i>
            <router-link to="/cate" tag="span">商品分类</router-link>
            </el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="4">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span>订单管理</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="4-1">
            <i class="el-icon-location"></i>
            <router-link to="/dingdan" tag="span">订单列表</router-link>
            </el-menu-item>
        </el-menu-item-group>
      </el-submenu>
      <el-submenu index="5">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span>数据统计</span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="5-1">
            <i class="el-icon-location"></i>
            <router-link to="/data" tag="span">数据报表</router-link>
            </el-menu-item>
        </el-menu-item-group>
      </el-submenu> -->
    </el-menu>
    </div>
    <div class="content">
      <router-view></router-view>
    </div>
  </div>
</div>
